AssetWise CONNECT Edition Implementation Guide

To Install the Responsibility Matrix Engine

Follow these steps to configure the Apply Responsibility Matrix Engine, in AssetWise.
  1. In the AssetWise System Management Console (SMC), do the following:
    1. Apply the AssetWiseApplyResponsibilityMatrix database package to the desired Data Sources
    2. Register the eB Apply Responsibility Matrix (eB.Engine.ApplyResponsibilityMatrix.dll) engine in the desired Communities
    3. Enable the 'Apply Responsibility Matrix to Work Order' job type for the desired Communities
    4. Restart the eB Work Queue Service
  2. In SQL Server Management Studio, create an association between the AWRM entity metadata class and the desired Work Order class. The following SQL is an example:
    BEGIN TRAN
    DECLARE @em_Code NVARCHAR(100) = 'RM-WO-REV'
    DECLARE @wo_Class NVARCHAR(100) = 'REV'
    DECLARE @wo_Scope NVARCHAR(100) = 'FGP'
    
    DECLARE @rm_class_id INT = (SELECT TOP 1 class_id FROM class_objects WHERE group_id = 27 /*EntityMetadata*/ AND code = 'AWRM');
    DECLARE @wo_class_id INT = (SELECT TOP 1 co.class_id FROM class_objects co WITH (NOLOCK) INNER JOIN scopes s WITH (NOLOCK) ON s.namespace_id = co.namespace_id 
       WHERE co.group_id = 12 /*Work Order*/ AND co.code = @wo_Class /*Code of work order class*/ AND s.name = @wo_Scope /*Scope name of work order class*/);
    
    DECLARE @em_id INT = (SELECT TOP 1 em_id FROM entity_metadata WHERE code = @em_Code);
    IF @em_id IS NULL
    EXEC ebp_add_entity_metadata @em_Code, @em_Code, NULL, @rm_class_id, @wo_class_id, 185 /*Class*/, 1, @em_id output
    COMMIT TRAN;
    
    Note: For ebp_add_entity_metadata parameters, see ebp_add_entity_metadata Parameters.
  3. Repeat Step 2 for each Work Order class, in each scope.
  4. Using SQL Server Management Studio,
    1. Populate the MatrixSelectioneQL memo attribute on the new Entity Metadata object with the eQL to be used to select the proper Responsibility Matrices for the Work Order class
    2. Repeat Step 2 (a) for each Entity Metadata object.

    For example, the eQL takes three inputs in the WHERE clause:

    1. The Work Order ID: Use the string {0} in place of the Work Order ID
      1. Requires a relationship between the Work Order and the Virtual Item Group
      2. Set to {0} = {0} to ignore this input
    2. The Work Order Class ID: Use the string {1} in place of the Work Order class ID.
      1. Requires a relationship between the Work Order and the Virtual Item Group
      2. Set to {1} = {1} to ignore this input
    3. The Responsibility Matrix Group Virtual Item class ID: Use the string {2} in place of the Group Virtual Item Class ID
      1. Set to {2} = {2} to ignore this input

    The eQL query must return the Virtual Item Group ID with the Column named “Id”. Additional criteria can be added to the WHERE clause to filter the results further.

    An optional integer column “Priority”, if used, will determine the order the Virtual Item Groups are searched. If not provided, the system will search the Virtual Item Groups in the order they are returned by the query.

    Example SQL:
    BEGIN TRAN
    
    DECLARE @em_Code NVARCHAR(100) = 'RM-WO-REV'
    DECLARE @eQL NVARCHAR(MAX) = 'START WITH VirtualItemGroup SELECT 1 Priority, Id WHERE Scope.Name = ''Global'' AND {0}={0} AND {1}={1} AND Members.VirtualItem.Class.Id = {2}'
    
    DECLARE @em_id INT = (SELECT TOP 1 em_id FROM entity_metadata WHERE code = @em_Code);
    
    DECLARE @char_id INT = (SELECT TOP 1 char_id FROM characteristics WHERE object_type = 309 /*EntityMetadata*/ AND char_name = 'MatrixSelectioneQL');
    
    IF @em_id IS NOT NULL
    EXEC ebp_set_char_data @em_id, @char_id, NULL, NULL, NULL, @eQL, 1
    
    COMMIT TRAN;

    Example EQL result:

  5. In AssetWise Director, on the Responsibility Matrix Virtual Item Group, set MatrixDocumentElementeQL memo attribute by populating the value with the eQL that will be run against the first subject document in the Work Order.
    The eQL takes two inputs in the WHERE clause:
    1. The Document ID: Use the string {0} in place of the Document ID
    2. A comma separated list of the scopes tree: Use the string {1} in place of the full scope Id list.
    If more than one row is returned only the first row will be used.
    The following is an example that parses the document prefix. Relationship or attribute values could also be used.
    START WITH Document 
    SELECT 
       RIGHT(LEFT(Code,3),3) First,
       RIGHT(LEFT(Code,8),4) Second,
       RIGHT(LEFT(Code,12),3) Third,
       RIGHT(LEFT(Code,16),3) Forth 
    WHERE 
       Id = {0}
       AND Scope.Id IN ({1})

    Example EQL result:

  6. For each Work Task in the Work Orders to be refactored, set the MatrixActivity fixed value attribute to match a relationship label in the Responsibility Matrix. For example, Approver, Reviewer, Consolidator, or For Information.
  7. If you populate the MatrixOverride attribute on the Work Order to be refactored, all matching Responsibility Matrix entries being applied to the task will have a matching MatrixActivity value, regardless of the responsibility type. For example:

    A work order is being used to send "For Information" notifications based on the Responsibility Matrix for the subject document(s). The Responsibilty Matrix has four users (Approver, Consolidator, Reviewer, and For Information). The work order has two tasks, one of which has the MatrixActivity attribute populated with "For Information". The MatrixOverride attribute on the work order is populated with "For Information". When the work order is refactored, four "For Information" tasks will be created (one for each user).

  8. The MatrixPopulated attribute on the work order is set to "Yes" if the refactoring is successful. Its purpose is to prevent the work order from being refactored more than once.